﻿using DotNetExtensions.Core.Logging;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Text;

namespace DotNetExtensions.Core.WebApi.Extensions
{
    public static class LoggingExtensions
    {
        public static void AddProvider<TProvider, TProviderOptions>(this IApplicationBuilder builder) where TProvider : class, ILoggerProvider where TProviderOptions : class
        {
            LoggerManager.Default.AddProvider<TProvider, TProviderOptions>();
        }

        public static void AddProvider<TProvider, TProviderOptions>(this IServiceCollection services) where TProvider : class, ILoggerProvider where TProviderOptions : class
        {
            LoggerManager.Default.AddProvider<TProvider, TProviderOptions>();
        }
    }
}
